<div class="modal-content" ng-if="modaldata.op=='get'">
        <div class="modal-header">
            <button data-dismiss="modal" class="close hasoption-close" type="button">×</button>
            <h4 class="modal-title">视频抓取</h4>
        </div>
        <div class="modal-body">
			<div id="dataform" class="form-horizontal form" >
				<div class="form-group">
					<label class="col-sm-2 control-label must">PC端直播地址</label>
					<div class="col-sm-9">
						<input ng-model="pagedata.item.url" class="form-control" id="url" placeholder="直播间详情页地址，请以http://或https://开头" />
						<span class="help-block">注意：请复制直播间详情页的链接 例如：http://www.inke.cn/liveroom/index.html?uid=xxxxx&id=xxxx (以http://或https://开头)</br>[<red>温馨提示</red>]：考虑个大直播流的规则变动频繁，经常会采集不到直播源。建议可以网上搜索一些直播源抓取工具。然后把直播源地址复制到下面的：《视频流》输入框！</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<div class="btn btn-primary" ng-click="pagedata.get()">点击获取</div>
						<button ng-if="modaldata.showinfo" data-dismiss="modal" class="btn btn-info" type="button">使用地址</button>
					</div>
				</div>
				<div ng-if="modaldata.showinfo" class="video-info">
					<div class="form-group splitter"></div>
					<div class="form-group">
						<label class="col-sm-2 control-label">视频来源</label>
						<div class="col-sm-9">
							<div class="form-control-static">{{pagedata.item.typeName}}</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">直播状态</label>
						<div class="col-sm-9">
							<div class="form-control-static">
								<label class="label label-success">{{pagedata.item.infostatus}}</label>
							</div>
						</div>
					</div>
				</div>
				<div ng-if="modaldata.showinfo" class="video-info2">
					<div class="form-group">
						<label class="col-sm-2 control-label">直播缩略图</label>
						<div class="col-sm-9">
							<img id="real_img" ng-src="{{pagedata.item.image}}" onerror="this.src='../core/resource/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
						</div>
						<span class="help-block">如果直播间属于：未直播状态的，可能无法获取到缩略图</span>
					</div>
				</div>
			</div>
        </div>
</div>
<script type="text/javascript">
scope.pagedata.get=function(){
	scope.modaldata.showinfo=false;
	scope.post_json('/room/get/',{'url':scope.pagedata.item.url},function(res){
		if(res.status==1){
			scope.pagedata.item.infostatus='直播中';
		}else{
			scope.pagedata.item.infostatus='未直播';
		}
		scope.modaldata.showinfo=true;
		scope.pagedata.item.livept=res.type;
		scope.pagedata.item.typeName=res.typeName;
		scope.pagedata.item.image=res.poster?res.poster:scope.pagedata.item.image;
		scope.pagedata.item.hls_url=res.hls_url;
		scope.$evalAsync();
	})
}
</script>
